<?php
// +----------------------------------------------------------------------
// | 众联TK架构 [ ZoomTk ]
// +----------------------------------------------------------------------
// | 版权所有 2017~2037 成都众联思索科技有限公司 [ http://www.zoomtk.com ]
// +----------------------------------------------------------------------
// | 官方网站: http://www.sopvip.com
// +----------------------------------------------------------------------
// | 开源协议 ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------

namespace app\expbao\model;
use think\Model;
use think\Db;

/**
 * 会员用户模型
 * @package app\admin\model
 */
class ExOptUser extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = '__EXPBAO_OPERATION_USER__';
    protected $createTime = 'creatime';
    protected $updateTime = 'updatetime';
    // 自动写入时间戳
    protected $autoWriteTimestamp = true;

         public static function getoptidbyid($ouid)
        {
           if ($ouid === null) $this->error('缺少参数');
        $map = [
            'id'     => $ouid
        ];
           if ($ouid) {

               //$optid=Db::table('__EXPBAO_OPERATION_USER__')->where($map)->value('oid');
              $optid=self::where($map)->value('oid');
               //var_dump(self::getLastSql());
               //Db::getLastSql();
               return $optid;
           }
           
        }
}
